package com.mytest.main;

		import com.mytest.config.TestConfig;
		import com.mytest.service.TestService;
		import org.springframework.context.annotation.AnnotationConfigApplicationContext;
		import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Test {
	public static void main(String[] args) {

		AnnotationConfigApplicationContext annotationConfigApplicationContext = new AnnotationConfigApplicationContext(TestConfig.class);
		TestService bean = annotationConfigApplicationContext.getBean(TestService.class);
		bean.testMethod();
		ClassPathXmlApplicationContext classPathXmlApplicationContext = new ClassPathXmlApplicationContext("spring.xml");
		TestService bean1 = classPathXmlApplicationContext.getBean(TestService.class);
		bean1.testMethod();
	}
}
